<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" import="java.sql.*"%>
<table width="155" border="0" cellpadding="0" cellspacing="0">
<%
String left=request.getParameter("left");
String acid=request.getParameter("acid");
if("".equals(acid) || acid==null){
acid="";
}
if(!("".equals(left) || "null".equals(left) || left==null)){
leftid=left;
}
//request.getRequestURL();
ResultSet rsa=con.getRs("select * from web_part where sjid="+leftid+" order by sort asc");
ResultSet rsb,rsd;
String paid="0";
String spaid="0";
String clid=(String)session.getAttribute("clid");
if(clid==null){
clid="";
}
try{
     while(rsa.next()){ %>
	      <tr>
             <td height="52" background="images/rcbj.gif" class="lanbcolor"><%=rsa.getString("partname") %></td>
           </tr>
           <% paid=rsa.getString("isxj");
              if("1".equals(paid)){ 
                   paid=rsa.getString("partid");
		           rsb=con.getRs("select * from web_part where  sjid="+paid+" order by sort asc");
		           try{
			           while(rsb.next()){
			           paid=rsb.getString("partid"); 
			           %>
			           <tr>
			             <td  align="center" valign="middle"   onclick="selLeft('<%=paid%>')">	
							<table width="94%" border="0" cellpadding="0" cellspacing="0" >
							  <tr>
								<td width="91%" height="33" align="left" class="selrc" style="border-bottom:1px solid #ccc;" >&nbsp;&nbsp;<a id="leftmenu_<%=paid%>" onclick="selLeft('<%=paid%>')" ref='leftmenu' href="<%=rsb.getString("partpath") %>" class="lanbcolor" style="font-size:12px;<% if(acid==paid){out.print("font-weight: bold;");}%>"><%=rsb.getString("partname") %></a></td>
							    <td width="9%" align="left" class="selrc" style="border-bottom:1px solid #ccc;" ><img src="images/rcj.gif" width="14" height="14" border="0" align="absmiddle" /></td>
							  </tr>
						   </table>
						   <%  spaid=rsb.getString("isxj");
							if("1".equals(spaid)){%>
							 <table width="94%" border="0" cellpadding="0" cellspacing="0"  id="ab<%=paid%>" <% if(clid.equals(paid)){}else{%>style="display:none"<%}%> >
							<%    spaid=paid;
								if(spaid!=null&&!spaid.equals(""))
								{
								rsd=con.getRs("select * from web_part where sjid="+spaid+" order by sort asc");
								}else{
                                 rsd=con.getRs("select * from web_part where sjid=1 order by sort asc");
								}
								try{
								    while(rsd.next()){
								    spaid=rsd.getString("partid");
								   %>
							  <tr>
								<td width="90%" height="33" style="border-bottom:1px solid #ccc;" onclick="selLeft('<%=paid%>')"><a style="float:left;FONT-SIZE: 12px;padding-left:30px;" id="leftmenu_<%=spaid%>" ref='leftmenu' href="<%=rsd.getString("partpath") %>" class="lanbcolor"><%=rsd.getString("partname") %></a></td>
							    <td width="10%" style="border-bottom:1px solid #ccc;"><img src="images/rcj.gif" width="14" height="14" border="0" align="absmiddle" /></td>
						     </tr>						  
                           <%       }								
								}catch(Exception e){ }%>
						</table>
						 <%	}%>
						</td>
			           </tr><%
					   } 
		           }catch(Exception e){ }
              } 
           }%>
<%}catch(Exception e){ }
%>
</table>
<script type="text/javascript">
function overleft(v,o){
if(o=='s'){
 $("#ab"+v).css({"display":"block"});
 }else{
  $("#ab"+v).css({"display":"none"});
 }
}

var oleftmenu=$("[ref='leftmenu']");
var onums=oleftmenu.length;
for(var t=0;t<onums;t++){
	oleftmenu.eq(t).css({"font-weight":"normal"});
}
function selLeft(v){
            var url="session.jsp?clid="+v;
		    $.get(url).success(function(response){
			}).error(function () { });	
		    setTimeout("",1000);
}
</script>
